<template>
  <div>
    <keep-alive include="placeOrder">
      <router-view></router-view>
    </keep-alive>
  </div>
</template>

<script>
export default {
  name: 'order',
  data () {
    return {
      
    }
  },
  watch:{
    '$route'(to,from){
      var fromV = from.path;
      //为了搜索清楚缓存
      if(fromV == '/order'){//从订单首页来的
        sessionStorage.removeItem('goods');
        sessionStorage.removeItem('memo');
      };
      if(!(fromV == '/search') || !(fromV == '/seachGoods')){//不是从搜索页来的
        sessionStorage.removeItem('sechtxt');
      }
    }
  },
}
</script>